<?php

namespace common\lib;

use yii\helpers\Html;

class defaultHtml extends Html{
    
    public static function searchInput(
            $name, 
            $btnLabel, 
            $value = null, 
            $textOptions = ['class' => 'form-control', placeholder => '关键词'], 
            $btnOptions = ['type' => 'button', 'class' => 'btn btn-default']
        ){
        $input = static::textInput($name, $value, $textOptions);
        $btn = static::button($btnLabel, $btnOptions);
        $span = static::tag('span', $btn, ['class' => 'input-group-btn']);
        $searchInput = static::tag('div', $input . $span, ['class' => 'inline input-group']);
        return $searchInput;
    }
}
